import requests
#导入pprint,漂亮的打印数据结构
import pprint
api_url="https://restapi.amap.com/v3/place/text?parameters"
params={
    "key":"e094cccaa9f94c734344ab015d8b4ec6",
    "keywords":"美食",
    "city":"北京"
}
response = requests.get(api_url,params=params)
pprint.pprint(response.json())